/*
 Navicat MySQL Data Transfer

 Source Server         : mysql
 Source Server Type    : MySQL
 Source Server Version : 80018
 Source Host           : 127.0.0.1:3306
 Source Schema         : test

 Target Server Type    : MySQL
 Target Server Version : 80018
 File Encoding         : 65001

 Date: 17/01/2020 10:20:08
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for sys_buttons
-- ----------------------------
DROP TABLE IF EXISTS `sys_buttons`;
CREATE TABLE `sys_buttons` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `title` varchar(20) NOT NULL,
  `click` varchar(20) NOT NULL,
  `icon` varchar(20) DEFAULT NULL,
  `state` varchar(1) DEFAULT NULL,
  `order_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of sys_buttons
-- ----------------------------
BEGIN;
INSERT INTO `sys_buttons` VALUES (1, '新增', 'add', 'h-icon-plus', '1', 1);
INSERT INTO `sys_buttons` VALUES (2, '编辑', 'edit', 'h-icon-edit', '0', 2);
INSERT INTO `sys_buttons` VALUES (3, '删除', 'del', 'h-icon-trash', '0', 3);
INSERT INTO `sys_buttons` VALUES (4, '查看', 'see', 'h-icon-task', '0', 4);
COMMIT;

-- ----------------------------
-- Table structure for sys_menus
-- ----------------------------
DROP TABLE IF EXISTS `sys_menus`;
CREATE TABLE `sys_menus` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '自增编号',
  `title` varchar(30) NOT NULL COMMENT '菜单名称',
  `key` varchar(50) DEFAULT NULL COMMENT '访问地址',
  `icon` varchar(30) DEFAULT NULL COMMENT '菜单图标',
  `super_id` varchar(30) DEFAULT NULL COMMENT '上级编号',
  `btn_id` varchar(60) DEFAULT NULL COMMENT '支持按钮',
  `menu_order` int(11) DEFAULT NULL COMMENT '排序',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of sys_menus
-- ----------------------------
BEGIN;
INSERT INTO `sys_menus` VALUES (1, '系统管理', '', 'h-icon-home', '', '', 1);
INSERT INTO `sys_menus` VALUES (2, '菜单管理', '/sysmenus', '', '1', '1,2,3,4,5', 2);
INSERT INTO `sys_menus` VALUES (3, '用户管理', '/sysusers', '', '1', '1,2,3,4,5', 3);
INSERT INTO `sys_menus` VALUES (4, '字典管理', '/sysparams', '', '1', '1,2,3,4,5', 4);
INSERT INTO `sys_menus` VALUES (5, '按钮管理', '/sysbuttons', '', '1', '1,2,3,4', 5);
INSERT INTO `sys_menus` VALUES (6, '角色管理', '/sysroles', '', '1', '1,2,3,4,5', 6);
INSERT INTO `sys_menus` VALUES (8, '功能管理', '/sysrolemenu', NULL, '1', '1,3', NULL);
COMMIT;

-- ----------------------------
-- Table structure for sys_params
-- ----------------------------
DROP TABLE IF EXISTS `sys_params`;
CREATE TABLE `sys_params` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '自增编号',
  `title` varchar(50) NOT NULL COMMENT '参数名称',
  `key` varchar(30) NOT NULL COMMENT '参数值',
  `group_name` varchar(30) NOT NULL COMMENT '分组名称',
  `group_id` varchar(30) NOT NULL COMMENT '分组编号',
  `other_value` varchar(30) DEFAULT NULL COMMENT '其它值',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of sys_params
-- ----------------------------
BEGIN;
INSERT INTO `sys_params` VALUES (2, '男', '1', '性别', 'Sex', '1');
INSERT INTO `sys_params` VALUES (3, '女', '0', '性别', 'Sex', '2');
INSERT INTO `sys_params` VALUES (1, '正常', '1', '状态', 'State', '1');
INSERT INTO `sys_params` VALUES (4, '停用', '0', '状态', 'State', '2');

COMMIT;

-- ----------------------------
-- Table structure for sys_role_menu
-- ----------------------------
DROP TABLE IF EXISTS `sys_role_menu`;
CREATE TABLE `sys_role_menu` (
  `role_id` bigint(20) NOT NULL COMMENT '角色编号',
  `menu_id` bigint(20) NOT NULL COMMENT '菜单编号',
  `button_ids` varchar(100) DEFAULT NULL COMMENT '按钮编号'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of sys_role_menu
-- ----------------------------
BEGIN;
INSERT INTO `sys_role_menu` VALUES (1, 1, NULL);
INSERT INTO `sys_role_menu` VALUES (1, 2, '1,2,3,4,5');
INSERT INTO `sys_role_menu` VALUES (1, 3, '1,2,3,4,5');
INSERT INTO `sys_role_menu` VALUES (1, 4, '1,2,3,4,5');
INSERT INTO `sys_role_menu` VALUES (1, 5, '1,2,3,4');
INSERT INTO `sys_role_menu` VALUES (1, 6, '1,2,3,4,5');
INSERT INTO `sys_role_menu` VALUES (1, 8, '1,3');
COMMIT;

-- ----------------------------
-- Table structure for sys_roles
-- ----------------------------
DROP TABLE IF EXISTS `sys_roles`;
CREATE TABLE `sys_roles` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `name` varchar(50) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of sys_roles
-- ----------------------------
BEGIN;
INSERT INTO `sys_roles` VALUES (1, '管理员');
COMMIT;

-- ----------------------------
-- Table structure for sys_users
-- ----------------------------
DROP TABLE IF EXISTS `sys_users`;
CREATE TABLE `sys_users` (
  `account` varchar(100) NOT NULL COMMENT '账号',
  `pass` varchar(256) NOT NULL COMMENT '密码',
  `name` varchar(50) NOT NULL COMMENT '姓名',
  `phone` varchar(11) NOT NULL COMMENT '手机号',
  `email` varchar(50) DEFAULT NULL COMMENT '邮箱',
  `sex` char(1) DEFAULT NULL COMMENT '性别',
  `age` varchar(3) DEFAULT NULL COMMENT '年龄',
  `role_id` varchar(50) NOT NULL COMMENT '角色权限',
  PRIMARY KEY (`account`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of sys_users
-- ----------------------------
BEGIN;
INSERT INTO `sys_users` VALUES ('admin', 'C7F66BEEE198FB411C8623E53CBBC6EB1E0F078B5D68ED7F10D02FFB0AF46D44', '管理员', '15308066831', 'srandroid@163.com', '1', '28', '1');
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
